﻿using System;
using System.Web;
using System.Collections.Generic;

public class QueryStrings
{
    public static string Action
    {
        get
        {
            if (HttpContext.Current.Request.QueryString["Action"] == null)
            {
                return "";
            }

            return HttpContext.Current.Request.QueryString["Action"].ToLower();
        }
    }

    public static int ProductId
    {
        get
        {
            if (HttpContext.Current.Request.QueryString["ProductId"] == null)
            {
                return -1;
            }

            return int.Parse(HttpContext.Current.Request.QueryString["ProductId"]);
        }
    }

    //public static List<int> SelectedProducts
    //{
    //    get
    //    {
    //        return (List<int>)HttpContext.Current.Session["SelectedProducts"];
    //    }
    //    set
    //    {
    //        HttpContext.Current.Session["SelectedProducts"] = value;
    //    }
    //}



    public static string GlobalMessage
    {
        get
        {
            if (HttpContext.Current.Session["GlobalMessage"] == null)
            {
                return "";
            }

            return (string) HttpContext.Current.Session["GlobalMessage"];
        }
        set
        {
            HttpContext.Current.Session["GlobalMessage"] = value;
        }
    }

    public static string PhotoType
    {
        get
        {
            if (HttpContext.Current.Request.QueryString["PhotoType"] == null)
            {
                return "";
            }

            return HttpContext.Current.Request.QueryString["PhotoType"].ToLower();
        }
    }

 
}

